import request from '@/utils/request'

/**
 * 获取集合
 * @param param
 * @return {*}
 */
export function list(param) {
  return request({
    url: '/gcxt/unannouncedInspection/list',
    method: 'get',
    params: param
  })
}

/**
 * 保存
 * @param data
 * @return {*}
 */
export function save(data) {
  return request({
    url: '/gcxt/unannouncedInspection/save',
    method: 'POST',
    data: data
  })
}

/**
 * 修改
 * @param data
 * @return {*}
 */
export function modify(data) {
  return request({
    url: '/gcxt/unannouncedInspection/modify',
    method: 'POST',
    data: data
  })
}

/**
 * 修改
 * @param data
 * @return {*}
 */
export function remove(data) {
  return request({
    url: '/gcxt/unannouncedInspection/remove',
    method: 'POST',
    data: data
  })
}

/**
 * 下載模板
 * @return {*}
 */
export function downloadTemplate() {
  return request({
    url: '/gcxt/unannouncedInspection/downloadTemplate',
    method: 'GET',
    responseType: 'blob'
  }, {
    source: true
  })
}

/**
 * 上传数据
 * @return {*}
 */
export function importData() {
  return request({
    url: '/gcxt/unannouncedInspection/importData',
    method: 'POST'
  })
}
